package jtk.project4.fleet.templateField;

import java.awt.Dimension;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.NumberField;
import nl.coderight.jazz.form.field.TextField;

public class ContohTextField extends GroupControl{
	private TextField contohTextField1 ;
	private TextField contohTextField2 ;
	private TextField contohTextField3 ;
	private NumberField contohTextField4 ;
	
	public ContohTextField(String bindID){
		setTitle("header.nama field");
		setBindID(bindID);
		createFields();
		createLayout();
	}
	
	private void createFields(){
		Dimension dimension = new Dimension(166, 20);
		contohTextField1 = new TextField ("atribut1",20);
		contohTextField1.setRequired(true);
		
		contohTextField2 = new TextField ("atribut2", 20);
		contohTextField2.setEditable(false);
		
		contohTextField3 = new TextField ("atribut3", 20);
		
		contohTextField4 = new NumberField ("atribut4", 20);
	}
	
	private void createLayout() {
		setLayout(new FormLayout())
		.addLabel("label.text1")		.addField(contohTextField1)
		.addLabel("label.text2")		.addField(contohTextField2)
		
		.addRow()
		.addLabel("label.text3")		.addField(contohTextField3)
		.addRow()
		.addLabel("label.text4")		.addField(contohTextField4);
	}
}
